The present invention generally relates to the storage of data points within a memory device, and more specifically, to a nonlinear storage arrangement of a texture map within a linear memory device.
FIG. 1 is an illustration of a texture map matrix 10 of data points T(0,0)-T(F,F). Texture map matrix 10 includes sixteen rows and sixteen columns of data points, and each data point of texture map matrix 10 includes eight bits of information. Data points T(0,0)-T(F,F) can represent any form of texture data such as true color data, compressed texture data, and palletized data.
Traditionally, a computer processor is either designed and/or programmed to store data points T(0,0)-T(F,F) in a linear arrangement within sequential memory locations of a linear memory device. The particular linear storage arrangement of data points T(0,0)-T(F,F) within the sequential memory locations is solely dependent upon the bit width of each memory location. For example, FIG. 2 illustrates a linear storage arrangement of data points T(0,0)-T(F,F) within sequential memory locations 000000-111111 of a linear memory device 20a. Each memory location of linear memory device 20a is thirty-two bits, and therefore, four distinct data points of texture map matrix 10 is stored within each memory location. As illustrated in FIG. 3, a second linear storage arrangement of data points T(0,0)-T(F,F) within sequential memory locations 000000-011111 of a linear memory device 20b has eight distinct data points of texture map matrix 10 within each memory location due to the bit width of each memory location being sixty-four bits. As illustrated in FIG. 4, a third linear storage arrangement of data points T(0,0)-T(F,F) within sequential memory locations 000000-001111 of a linear memory device 20c has sixteen distinct data points of texture map matrix 10 within each memory location due to the bit width of each memory location being 128 bits.
A texel calculation of a bi-linear textured pixel from texture map matrix 10 consists of executing a weighted average of a submatrix of four adjacent data points of texture map matrix 10. The four adjacent data points comprise a texel matrix. Referring to FIG. 5, such texel matrixes are texel matrix 11a consisting of adjacent data points T(0,0), T(0,1), T(1,0) and T(1,1), texel matrix 11b consisting of adjacent data points T(4,3), T(4,4), T(5,3) and T(5,4), texel matrix 11c consisting of adjacent data points T(8,7), T(8,8), T(9,7) and T(9,8)}, texel matrix 11d consisting of adjacent data points T(B,B), T(B,C), T(C,B) and T(C,C), and texel matrix 11e consisting of adjacent data points T(E,E), T(E,F), T(F,E) and T(F,F).
Due to the linear storage arrangement of data points T(0,0)-T(F,F) illustrated in FIG. 2, memory reads of memory locations 000000 and 000100 of linear memory device 20a are required in order to retrieve data points T(0,0), T(0,1), T(1,0) and T(1,1) prior to executing a texel calculation of texel matrix 11a. Two memory reads of linear memory device 20a are also required prior to executing a texel calculation of texel matrix 11e. Furthermore, memory reads of memory locations 010000, 010001, 010100, and 010101 of linear memory device 20a are required in order to retrieve data points T(4,3), T(4,4), T(5,3) and T(5,4) prior to executing a texel calculation of texel matrix 11b. Four memory reads of linear memory device 20a are also required prior to executing a texel calculation of texel matrixes 11c, and 11d. It is to be appreciated and understood that two memory reads of linear memory device 20a are required for 75% of the possible texel calculations of texture map matrix 10, and four memory reads of linear memory device 20a are required for 25% of the possible texel calculations of texture map matrix 10. Consequently, the average number of memory reads of linear memory device 20a after the execution of all possible texel calculations of texture map matrix 10 is 2.50 memory reads.
Due to the linear storage arrangement of data points T(0,0)-T(F,F) illustrated in FIG. 3, memory reads of memory locations 000000 and 000010 of linear memory device 20b are required in order to retrieve data points T(0,0), T(0,1), T(1,0) and T(1,1) prior to executing a texel calculation of texel 11a. Two memory reads of linear memory device 20b are also required prior to executing a texel calculation of texel matrixes 11b, 11d, and 11e. Furthermore, memory reads of memory locations 010000, 010001, 010010, and 010011 of linear memory device 20b are required in order to retrieve data points T(8,7), T(8,8), T(9,7) and T(9,8) prior to executing a texel calculation of texel matrix 11c. It is to be appreciated and understood that two memory reads of linear memory device 20b are required for 87.5% of the possible texel calculations of texture map matrix 10 and four memory reads of linear memory device 20b are required for 12.5% of the possible texel calculations of texture map matrix. Consequently, the average number of memory reads of linear memory device 20b after the execution of all possible texel calculations of texture map matrix 10 is 2.25 memory reads.
Due to the linear storage arrangement of data points T(0,0)-T(F,F) illustrated in FIG. 4, memory reads of memory locations 000000 and 000001 of linear memory device 20c are required in order to retrieve data points T(0,0), T(0,1), T(1,0) and T(1,1) prior to executing a texel calculation of texel matrix 11a. It is to be appreciated and understood that two memory reads of linear memory device 20c are required prior to executing any of the possible texel calculations of texture map matrix 10. Consequently, the average number of memory reads of linear memory device 20c after the execution of all possible texel calculations of texture map matrix 10 is two memory reads.
A modified texel calculation of a bi-linear textured pixel from texture map matrix 10 consists of selecting the most heavily weighted texture data point of a texel matrix and then selecting the data point of the texel matrix that is diagonally across from most heavily weighted texture data point. A weighted average of the two data points is then executed. For example, referring back to FIG. 5, if data point T(0,0) is the most heavily weighted texture data point of texel matrix 11a, then data points T(0,0) and T(1,1) would be selected, and a weighted average of data points T(0,0) and T(1,1) would be executed. It is to be appreciated and understood that the number of memory reads required to execute a modified texel calculation of a particular texel matrix from texture map matrix 10 when texture map matrix 10 is in a linear storage arrangement within a linear memory device is the same as the number of memory reads required to execute a texel calculation of that particular texel matrix. Therefore, the average number of memory reads of linear memory device 20a of FIG. 2 after the execution of all possible modified texel calculations of texture map matrix 10 is 2.50 memory reads, the average number of memory reads of linear memory device 20b of FIG. 3 after the execution of all possible modified texel calculations of texture map matrix 10 is 2.25 memory reads, and the average number of memory reads of linear memory device 20c of FIG. 4 after the execution of all possible modified texel calculations of texture map matrix 10 is two memory reads.
While the speed performance of a system executing a single texel execution or modified texel calculation is normally insignificant, the speed performance of the system is very significant during the execution of multiple texel calculations and/or modified texel calculations. In effect, the greater the number of texel calculations and/or modified texel calculations executed by the system, the closer the speed performance of the system depends upon the average number of memory reads of the linear memory device. And, when the system executes all of the possible texel calculations and/or modified texel calculations of texture map matrix 10, the speed performance of the system is directly dependent on the average number of memory reads of the linear memory device. Consequently, a reduction in the average number of memory reads per execution of all of the possible texel calculations and/or modified texel calculations of texture map matrix 10 will improve the overall speed performance of the system during the execution of multiple texel calculations and/or modified texel calculations.